home *** CD-ROM | disk | FTP | other *** search
- /*
- ** This ARexx program performs a radial wave animation on an image.
- ** Source is any IFF file. Destination is <length> iff files of the form
- ** <dest>.xxx. Destination file size is currently set to 256x200 and the
- ** imagepath is set to "work:".
- */
-
- PARSE ARG source dest start length
-
- say 'START'
- say source dest start length
-
-
- /*
- * open rexxsupport.library -- needed for some functions
- */
- if ~show('L',"rexxsupport.library") then do
- if addlib('rexxsupport.library',0,-30,0) then do
- /* everything's ok */
- end;
- else do
- say 'We Have A Library Problem, Unable To Load "rexxsupport.library"';
- say 'Cannot operate wipe.rexx without this library - sorry!';
- exit 10;
- end;
- end;
-
- /*
- * This will automatically direct the script to the proper
- * software, if it is running.
- */
- prtnme = 'IP_Port'; /* assume Image Professional */
- if show('P','IP_Port') = 0 then do
- if show('P','IM_Port') = 0 then do
- say "Can't find image processor's ARexx port!!!"; /* not running? */
- say "This script requires IP, IM or IM F/c to run!";
- exit(20);
- end;
- else do
- prtnme = 'IM_Port'; /* That's the thing about assumptions... */
- end; /* We make em, user's break em. */
- end;
-
- options results;
- address;
-
- address(prtnme);
-
-
- imagepath "work:"
- width=350
- height=450
- xrad=20
- yrad=20
- wavelength=40
- mag=40
- phase=0
-
- frame=start
- /* Comment out load to use image in ImageMaster buffer 0. */
- /* Must be only buffer open in ImageMaster to work correctly. */
- load source
- do length
- frame=RIGHT(frame,3,'0')
- Say 'Working on Frame #'frame
- newcurrent 0
- entire
- clip ripple
- Say 'Showing new buffer'
- newcurrent 2
-
- /* Change following line for different origin and size of ripple. */
- oval 175 225 xrad yrad
- Say 'Performing wave operation'
- ripple wavelength mag phase
- entire
-
- SAY 'Saving Frame #'frame
- framestr=dest||frame'.iff'
- /* Change stretch parameters to change size of destination. */
- stretch 256 200 framestr
- SAVE 3
- killbuff 3
- killbuff 2
- /* To make the destination the same size as the original, replace */
- /* preceding lines with: */
- /* SAVE 2 */
- /* killbuff 2 */
-
- frame=frame+1
- xrad=xrad+15
- yrad=yrad+20
- mag=mag-1
- phase=phase+20
-
- end
- newcurrent 0
-